import { _decorator, Component, Node } from 'cc';
import { find } from 'cc';
import { Label } from 'cc';
import { instantiate } from 'cc';
import AbstractComponent from '../../base/AbstractComponent';
import UtilTool from '../../tools/UtilTool';
import { App } from '../../App';
import { MultiRoom } from './MultiRoom';
import { director } from 'cc';
import { LoadMg } from '../../tools/LoadMg';
const { ccclass, property } = _decorator;

let PROFESSION_MIN_FREE = 1000 // 专业球房最低入场金额

@ccclass('MultiSelect')
export class MultiSelect extends AbstractComponent {

    @property(Label)
    label_tip : Label = null;

    start() {
        // 专业场 大于：1000提示
        this.label_tip.string = UtilTool.formatStr(App.language.getLanguageLab(133), PROFESSION_MIN_FREE)
    }

    // 普通场
    onBtnAddCommon() {
        this.playClickAudio()
        LoadMg.showLoad({type:1})
        this.backToMultiRoom(0)
    }

    // 专业场
    onBtnAddProfessional() {
        this.playClickAudio()
        LoadMg.showLoad({type:1})
        this.backToMultiRoom(1)
    }

    onBtnBack() {
        this.playClickAudio()
        this.backToHall()
    }

}

